feat: support RedirectUrl countdown & auto-redirect after document decline#2221
Open
ahmdjunaid wants to merge 1 commit into
Open
feat: support RedirectUrl countdown & auto-redirect after document decline#2221ahmdjunaid wants to merge 1 commit into
ahmdjunaid wants to merge 1 commit into
Conversation
|
@ahmdjunaid is attempting to deploy a commit to the prafull 's projects Team on Vercel. A member of the Team first needs to authorize it. |
ahmdjunaid
force-pushed
the
feature/redirect-after-decline
branch
from
July 23, 2026 15:27
1d6e8ba to
3150bea
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR extends the RedirectUrl functionality so that signers are automatically redirected to the configured RedirectUrl after declining a document, matching the existing post-signing redirect behavior.
1. Post-Decline Auto Redirect & Countdown Timer
Updated declineDoc() in PdfRequestFiles.jsx to trigger the 5-second countdown timer when a document has a RedirectUrl configured.
Inlined the live countdown notice box (RedirectNotice) inside PdfDeclineModal so signers see a real-time countdown ("Redirecting you in 5 seconds...") with a Cancel option.
Formatted RedirectUrl to automatically prepend https:// if protocol prefix is missing.
Used window.location.href for direct navigation to prevent browser popup blockers from blocking the delayed redirect.
2. Decline Modal UI Refinements
Formatted header title to display Decline "Document Name" dynamically during decline prompt, and Document declined after completion.
Maintained standard OpenSign theme styling (op-btn-primary, op-btn-ghost, clean theme typography).
Formatted container to a compact max-w-[440px] modal box for optimal visual balance across all screen sizes.
Files Changed
apps/OpenSign/src/pages/PdfRequestFiles.jsx: Trigger redirect countdown timer upon decline API success; render live countdown box in decline modal; format protocol prefix.
apps/OpenSign/src/primitives/PdfDeclineModal.jsx: Refine modal box width, title typography, and standard theme button hierarchy.
How to Test
Create a document with a RedirectUrl set (e.g. https://google.com).
Open the recipient signing link.
Click Decline and enter a reason.
Verify:
Header title shows Decline "".
Modal displays live countdown notice: "Redirecting you in 5 seconds...".
Timer counts down (5 → 4 → 3 → 2 → 1 → 0) and redirects to https://google.com.
Clicking Cancel halts the redirect.